# 需求：打开注册A页面，完成以下操作
# 1).通过脚本执行输入用户名：admin；密码：123456；电话号码：18611111111；电子邮件：123@qq.com
# 2).间隔3秒，修改电话号码为：18600000000
# 3).间隔3秒，点击‘注册’按钮
# 4).间隔3秒，关闭浏览器
# 5).元素定位方法不限

import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("http://121.43.169.97:8848/pageA.html")
# 输入用户信息
driver.find_element(By.ID,"userA").send_keys("admin")
driver.find_element(By.ID,"passwordA").send_keys("123456")
driver.find_element(By.ID,"telA").send_keys("18611111111")
driver.find_element(By.NAME,"emailA").send_keys("123@qq.com")

# 间隔3秒后修改电话
time.sleep(3)
tel_input = driver.find_element(By.ID,"telA")
tel_input.clear()
tel_input.send_keys("18600000000")

# 间隔3秒后点击注册按钮
time.sleep(3)
driver.find_element("tag name","button").click()

time.sleep(4)
driver.quit()





